﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Community.CsharpSqlite
{
    class BtreeMeta
    {
        /*
    ** The second parameter to sqlite3BtreeGetMeta or sqlite3BtreeUpdateMeta
    ** should be one of the following values. The integer values are assigned
    ** to constants so that the offset of the corresponding field in an
    ** SQLite database header may be found using the following formula:
    **
    **   offset = 36 + (idx * 4)
    **
    ** For example, the free-page-count field is located at byte offset 36 of
    ** the database file header. The incr-vacuum-flag field is located at
    ** byte offset 64 (== 36+4*7).
    */
        //#define BtreeMeta.BTREE_FREE_PAGE_COUNT     0
        //#define BtreeMeta.BTREE_SCHEMA_VERSION      1
        //#define BtreeMeta.BTREE_FILE_FORMAT         2
        //#define BtreeMeta.BTREE_DEFAULT_CACHE_SIZE  3
        //#define BtreeMeta.BTREE_LARGEST_ROOT_PAGE   4
        //#define BtreeMeta.BTREE_TEXT_ENCODING       5
        //#define BtreeMeta.BTREE_USER_VERSION        6
        //#define BtreeMeta.BTREE_INCR_VACUUM         7
        public const int BTREE_FREE_PAGE_COUNT = 0;
        public const int BTREE_SCHEMA_VERSION = 1;
        public const int BTREE_FILE_FORMAT = 2;
        public const int BTREE_DEFAULT_CACHE_SIZE = 3;
        public const int BTREE_LARGEST_ROOT_PAGE = 4;
        public const int BTREE_TEXT_ENCODING = 5;
        public const int BTREE_USER_VERSION = 6;
        public const int BTREE_INCR_VACUUM = 7;
    }
}
